Computers / Programming / Projects / Budgetor / Data Viewer - Database Tables

Overview

These are the database tables and related LINQ to SQL classes used in the prototype DataViewer program.

Months

Table containing month information

ColumnTypeKeyAllow NullsDescription
MonthIdintPrimaryNoUnique ID
DatedatetimeNoNoDate of the start of the month
StartSavingsfloatNoNoStarting chequing account value
StartChequingfloatNoNoStarting savings account value
StartCashfloatNoNoStarting cash value

Month.cs

cs type icon
Type: Table Class
Language: C#
Month.cs

Transactions

Table containing transaction information

ColumnTypeKeyAllow NullsDescription
TransactionIdintPrimaryNoUnique ID
MonthIdintForeignNoID of the containing month
DatedatetimeNoNoDate the transaction occurred
Descriptionnvarchar(150)NoNoDescription of the transaction
AmountfloatNoNoAmount of the transaction
CategoryIdintForeignNoID of the related category
IsCashbitNoNoTrue if transaction was with cash
RecurringExpenseMonthIdintForeignYesStarting savings account value
SpecialAccountMonthIdintForeignYesID of the relates special account (if any)

Transaction.cs

cs type icon
Type: Table Class
Language: C#
Transaction.cs

Categories

Table containing transaction category information

ColumnTypeKeyAllow NullsDescription
CategoryIdintPrimaryNoUnique ID
Namenvarchar(150)NoNoName of the category
Colournvarchar(7)NoNoBackground colour displayed
AccountintNoNoThe account the category uses
TypeintNoNoThe type the category uses
InUsebitNoNoTrue if still being used
IsSystembitNoNoTrue if system reserved

Category.cs

cs type icon
Type: Table Class
Language: C#
Category.cs

BudgetTypes

Table containing global budget type information

ColumnTypeKeyAllow NullsDescription
BudgetTypeIdintPrimaryNoUnique ID
Namenvarchar(150)NoNoName of the budget type
StandardAmountfloatNoNoStandard amount per month
InUsebitNoNoTrue if still being used

BudgetType.cs

cs type icon
Type: Table Class
Language: C#
BudgetType.cs

BudgetCategories

Table mapping budget types to categories

ColumnTypeKeyAllow NullsDescription
BudgetCategoryIdintPrimaryNoUnique ID
BudgetTypeIdintForeignNoID of the Budget Type
CategoryIdintForeignNoID of the Category

BudgetCatagory.cs

cs type icon
Type: Table Class
Language: C#
BudgetCatagory.cs

BudgetMonths

Table containing monthly instances of budget types

ColumnTypeKeyAllow NullsDescription
BudgetMonthIdintPrimaryNoUnique ID
BudgetTypeIdintForeignNoThe key of the related type
MonthIdintForeignNoThe key of the related month
AmountfloatNoNoThe amount per month

BudgetMonth.cs

cs type icon
Type: Table Class
Language: C#
BudgetMonth.cs

SpecialAccounts

Table containing global special account information

ColumnTypeKeyAllow NullsDescription
SpecialAccountIdintPrimaryNoUnique ID
TypeintNoNoThe type of the special account
Namenvarchar(150)NoNoThe name of the special account

SpecialAccount.cs

cs type icon
Type: Table Class
Language: C#
SpecialAccount.cs

SpecialAccountMonths

Table containing monthly instances of special accounts

ColumnTypeKeyAllow NullsDescription
SpecialAccountMonthIdintPrimaryNoUnique ID
SpecialAccountIdintForeignNoThe key of the related special account
MonthIdintForeignNoThe key of the related month
AmountfloatNoNoThe starting amount

SpecialAccountMonth.cs

cs type icon
Type: Table Class
Language: C#
SpecialAccountMonth.cs

RecurringExpenses

Table containing global recurring expense information

ColumnTypeKeyAllow NullsDescription
RecurringExpenseIdintPrimaryNoUnique ID
Namenvarchar(150)NoNoThe name of the recurring expense
InUsebitNoNoTrue if still being used

RecurringExpense.cs

cs type icon
Type: Table Class
Language: C#
RecurringExpense.cs

RecurringExpenseItems

Table containing information about specific items belong to recurring expenses

ColumnTypeKeyAllow NullsDescription
RecurringExpenseItemIdintPrimaryNoUnique ID
RecurringExpenseIdintForeignNoThe key of the related recurring expense
ParentIdintForeignYesThe key of the parent item (null if root)
Namenvarchar(150)NoNoThe item name
TypeintNoNoThe item type
AmountfloatNoNoThe item amount

RecurringExpenseItem.cs

cs type icon
Type: Table Class
Language: C#
RecurringExpenseItem.cs

RecurringExpenseMonths

Table containing monthly instances of recurring expenses

ColumnTypeKeyAllow NullsDescription
RecurringExpenseMonthIdintPrimaryNoUnique ID
RecurringExpenseIdintForeignNoThe key of the related recurring expense
MonthIdintForeignNoThe key of the related month
ExpectedAmountfloatNoNoThe month's expected amount

RecurringExpenseMonth.cs

cs type icon
Type: Table Class
Language: C#
RecurringExpenseMonth.cs